﻿global using System.Text.Json.Serialization;

namespace OpenPms.Data;

[Flags]
public enum EPayMode
{
    担保 = 1,
    微信 = 2,
    支付宝 = 4,
    银行卡 = 8,
    其他 = 16,
    担保完成 = 64

}
public enum EAccountType
{
    预付款,
    房费,
    消费
}
public class TAccountBase : TBase
{
    [Obsolete]
    [Key]
    public Guid Id { get; set; }
    [Display(Name = "预订单号")]
    public Guid ReservationId { get; set; }
    [DisplayName("类型")]
    public EAccountType AccountType { get; set; }
    [DisplayName("支付方式")]
    public EPayMode PayMode { get; set; }
    [Display(Name = "金额", Description = "包含押金")]
    public decimal Amount { get; set; }
    [DisplayName("押金")]
    public decimal Foregift { get; set; }
    [DisplayName("日期")]
    public DateTime DT { get; set; }
    [Display(Name = "付款人", Order = -1)]
    public string? Payer { get; set; }
    [Display(Name = "备注", Order = -1)]
    public string? Memo { get; set; }
    [Obsolete]
    [Display(Name = "订单号")]
    public Guid? OrderId { get; set; }
}
public class TAccount : TAccountBase
{
    [ForeignKey(nameof(ReservationId))]
    [Obsolete]
    public TReservation Reservation { get; set; } = default!;

}
